﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OOLib
{
   /// <summary>
   /// Document types
   /// </summary>
   public enum DocType
   {
      /// <summary>Unknown document type</summary>
      Unknown = 0,
      /// <summary>Writer document (see TextDocument)</summary>
      Writer = 1,
      /// <summary>Calc document</summary>
      Calc = 2,
      /// <summary>Draw document</summary>
      Draw = 3,
      /// <summary>Math (formula) document</summary>
      Math = 4
   }

   /// <summary>
   /// These constants are the codes for inserting control characters using XSimpleText::insertControlCharacter interface.
   /// </summary>
   public enum ControlCharacter
   {
      /// <summary>This control character starts a new paragraph. </summary>
      PARAGRAPH_BREAK = 0,
      /// <summary>This control character starts a new line in a paragraph.  </summary>
      LINE_BREAK = 1,
      /// <summary>This control character equals a dash but prevents this position from being hyphenated.  </summary>
      HARD_HYPHEN = 2,
      /// <summary>
      /// This control character defines a special position as a hyphenation point. 
      /// If a word containing a soft hyphen must be split at the end of a line, then this position is preferred. 
      /// </summary>
      SOFT_HYPHEN = 3,
      /// <summary>This control character is used to link two words and prevents this concatenation from being hyphenated. It is printed as a space.</summary>
      HARD_SPACE = 4,
      /// <summary>This control character appends a new paragraph.</summary>
      APPEND_PARAGRAPH = 5
   }

   /// <summary>
   /// Specify how the text content is attached to its surrounding text.
   /// </summary>
   public enum TextContentAnchorType
   {
      /// <summary>The anchor of the object is set at the top left position of the paragraph. </summary>
      AT_PARAGRAPH = 0,
      /// <summary>The object is anchored instead of a character. </summary>
      /// <remarks>The size of the object influences the height of the text line.</remarks>
      AS_CHARACTER = 1,
      /// <summary>The object is anchored to the page. </summary>
      /// <remarks>The position does not change if the content of the document is changed.</remarks>
      AT_PAGE = 2,
      /// <summary>The object is anchored to a text frame. </summary>
      AT_FRAME = 3,
      /// <summary>The object is anchored to a character. </summary>
      /// <remarks>The position of the object changes if the position of this character is changed. </remarks>
      AT_CHARACTER = 4
   }

   /// <summary>
   /// Enumeration values specify the text wrap around objects in a text.
   /// </summary>
   public enum WrapTextMode
   {
      /// <summary>Text does not flow around the object.  </summary>
      NONE = 0,
      /// <summary>Text flow ignores the object.</summary>
      THROUGHT = 1,
      /// <summary>Text flows to the left and right of the object.</summary>
      PARALLEL = 2,
      /// <summary>Text flow depends on the situation. The text formatting decides the best way.</summary>
      DYNAMIC = 3,
      /// <summary>Text flows to the left side of the object.</summary>
      LEFT = 4,
      /// <summary>Text flows to the right side of the object.</summary>
      RIGHT = 5
   }

   /// <summary>
   /// These types describe the algorithm to be used to search a frame.
   /// </summary>
   /// <remarks>
   /// Such flags will be used on methods XFrame::findFrame(), XDispatchProvider::queryDispatch() or 
   /// XComponentLoader::loadComponentFromURL() if no special target frame name (e.g. "_blank", "_self") is used.
   /// </remarks>
   [Flags]
   public enum FrameSearchFlag
   {
      /// <summary>Using of this flag will do nothing. Use right combination of other flags instead of this one.</summary>
      AUTO = 0,
      /// <summary>allows search on the parent frames</summary>
      PARENT = 1,
      /// <summary>includes the start frame himself</summary>
      SELF = 2,
      /// <summary>includes all child frames of the start frame</summary>
      /// <remarks>Note: That means all direct children and of course her childrens too. Search doesn't stop at the next level inside the tree!</remarks>
      CHILDREN = 4,
      /// <summary>frame will be created if not found</summary>
      CREATE = 8,
      /// <summary>includes the direct siblings of the start frame </summary>
      /// <remarks>
      /// Normaly it's interpreted as search on the direct childs of the parent only. But in combination with e.g. the 
      /// CHILDREN flag it can include all children of it too.
      /// </remarks>
      SIBLINGS = 16,
      /// <summary>allow the search outside the current sub task tree of the whole possible frame tree</summary>
      /// <remarks>
      /// If this flag isn't present, any search from bottom to top has to stop, if a top frame will be reached. 
      /// It doesn't influence a search from top to bottom. But it can be used at the root of the frame tree to search on 
      /// direct childrens of it only. Because the direct children of the root node are the root's of the task sub trees, 
      /// which are top frames too. Instead of using the CHILDREN flag there, it's possible so to supress a deeper search so. 
      /// </remarks>
      TASKS = 32,
      /// <summary>includes all frames except frames in other tasks sub trees but doesn't create any new frame</summary>
      ALL = 23,
      /// <summary>searches in the whole hierarchy of frames but doesn't create any new frame</summary>
      GLOBAL = 55
   }
}
